//
//  LTCoreDataHelper.h
//  GroceryDude
//
//  Created by 陈记权 on 11/9/15.
//  Copyright © 2015 陈记权. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>


static NSString * const storeFileName = @"Grocery-Dude.sqlite";

@interface LTCoreDataHelper : NSObject

@property (nonatomic, readonly) NSManagedObjectContext *context;
@property (nonatomic, readonly) NSManagedObjectModel *model;
@property (nonatomic, readonly) NSPersistentStoreCoordinator *coordinator;
@property (nonatomic, readonly) NSPersistentStore *store;

- (void)setupCoreData;
- (void)saveContext;

- (void)performBackgroundManagedMigrationForStore:(NSURL *)storeURL;

@end
